#pragma once
//#include "Definitions.h"

static void CreateCube(float radius, XMFLOAT3**_positions, XMFLOAT3** _normals,  XMFLOAT2** _tangents, XMFLOAT2** _uvs, UINT** _indices){

	UINT numVerts = 36;
	UINT numIndices = 36;

	XMFLOAT3* positions;
	XMFLOAT3* normals;
	XMFLOAT2* tangents;
	XMFLOAT2* uvs;
	UINT* indices;
}

static void CreatePlane(float radius, XMFLOAT3** _vertices, XMFLOAT3** _normals, XMFLOAT2** _uvs, XMFLOAT2** _tangents, UINT** _indices){
	/*

	Z
	|__X    O - origin

	(-r,r)		 ___________________   (r,r)
	t(0,0)		|					| t(1,0)	|
	n(0,1,0)	|					| n(0,1,0)	| r
				|		  O			|			|
				|					|
				|___________________|
		(-r,-r)					     (r,-r)
		t(0,1)						  t(1,1)
		n(0,1,0)					  n(0,1,0)


						  ----------
								r
	*/
	//XMFLOAT3 positions[] = {
	//	//Triangle1
	//	XMFLOAT3(-radius, 0, radius),
	//	XMFLOAT3(-radius, 0, -radius),
	//	XMFLOAT3(-radius, 0, -radius),
	//	//Triangle2
	//	XMFLOAT3(-radius, 0, radius),
	//	XMFLOAT3(radius, 0, -radius),
	//	XMFLOAT3(radius, 0, radius)
	//};

	XMFLOAT3* positions = new XMFLOAT3[4];

	positions[0] = XMFLOAT3(-radius, 0, radius);
	positions[1] = XMFLOAT3(-radius, 0, -radius);
	positions[2] = XMFLOAT3(radius, 0, -radius);
	positions[3] = XMFLOAT3(radius, 0, radius);

	*_vertices = positions;

	XMFLOAT3 xzNormal = XMFLOAT3( 0, 1, 0 );
	XMFLOAT3* normals = new XMFLOAT3[4];
	normals[0] = xzNormal;
	normals[1] = xzNormal;
	normals[2] = xzNormal;
	normals[3] = xzNormal;
	*_normals = normals;

	XMFLOAT2* uvs = new XMFLOAT2[4];

	uvs[0] = XMFLOAT2(0, 0);
	uvs[1] = XMFLOAT2(0, 1);
	uvs[2] = XMFLOAT2(1, 1);
	uvs[3] = XMFLOAT2(1, 0);

	*_uvs = uvs;

	XMFLOAT2 texVec = XMFLOAT2( 1, 0 );
	XMFLOAT2* tangents = new XMFLOAT2[4];

	tangents[0] = texVec;
	tangents[1] = texVec;
	tangents[2] = texVec;
	tangents[3] = texVec;
	*_tangents = tangents;

	UINT* indices = new UINT[6];
	indices[0] = 0;
	indices[1] = 3;
	indices[2] = 2;
	indices[3] = 0;
	indices[4] = 2;
	indices[5] = 1;

	*_indices = indices;
}

//static void CreateCube(float radius, float* _positions,...); //Use this to CHOOSE what attributes are needed

